Doc: First draft of a GDAL cookbook#13810
Draft
geographika wants to merge 1 commit intoOSGeo:masterfrom
Draft
Conversation
dbaston
reviewed
Jan 30, 2026
Member
dbaston
left a comment
There was a problem hiding this comment.
- I would put all new examples on the pages for the CLI tools and have the cookbook link to them.
- I can handle updating
.. example::so we don't have to maintain separate reference links. - I don't think we necessarily need to add new examples for
ogr2ogr,ogrinfoetc.
| .. code-tab:: bash | ||
|
|
||
| export OGR_SQLITE_ALLOW_EXTERNAL_ACCESS="YES" | ||
| gdal vector sql points.gpkg \ |
Member
There was a problem hiding this comment.
Off topic for this PR, but we should probably improve gdal raster pixel-info to have a less convoluted way of doing this.
Collaborator
Author
There was a problem hiding this comment.
I was quite please with myself to get that example working 😄
Member
There was a problem hiding this comment.
but we should probably improve
gdal raster pixel-infoto have a less convoluted way of doing this.
I'll tackle that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains a first draft of a GDAL command-line cookbook (see #12089). It will need many more examples before getting enough content to be considered for merging, this initial commit is to get agreement on an approach.
The approach aims to:
I went through a few iterations of the page structure (Q&A, bulleted lists), but the use of titles provides a nice page table of contents and linking.
I tried to update the https://github.com/OSGeo/gdal/blob/master/doc/source/_extensions/cli_example.py to allow for global example references, but there were issues with parallel Sphinx builds and having to process each file twice so I stopped. It may just be easier to add
:ref:s directly above linked examples.@dbaston @rouault - let me know your thoughts on the approach and structure.